package org.yangspring.samples.mvc.domain;

import org.hibernate.annotations.DiscriminatorOptions;

import javax.persistence.*;

/**
 * Created by whyang on 2017/06/19.
 */

@Entity
@Table(name = "T_company")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "world", discriminatorType = DiscriminatorType.STRING, length = 16)
@DiscriminatorValue(value = "chinese")
@DiscriminatorOptions(force = true)
//@Table(name = "")
public class Company {

    @Id
    @Column(name = "companyId")
    @GeneratedValue(strategy = GenerationType.TABLE)
    private int companyId;

    @Column(name = "cmpyName", nullable = false)
    private String cmpyName;

    @Column(length = 128, nullable = false)
    private String cmpylocation;

    @Column(length = 64, nullable = false)
    private String cmpyIndustry;

    public void setCmpyName(String cmpyName){
        this.cmpyName = cmpyName;
    }
    public String getCmpyName(){
        return this.cmpyName;
    }

    public void setCmpylocation(String cmpyLocation){
        this.cmpylocation = cmpyLocation;
    }
    public String getCmpylocation(){
        return this.cmpylocation;
    }

    public void setCmpyIndustry(String cmpyIndustry){
        this.cmpyIndustry = cmpyIndustry;
    }
    public String getCmpyIndustry(){
        return this.cmpyIndustry;
    }

}
